#include "UP_test.h"

#include "gd32f4xx.h"
#include "systick.h"
#include "bsp_i2c_oled.h"

void I2C_test(void)
{
    nvic_priority_group_set(NVIC_PRIGROUP_PRE2_SUB2); // 优先级分组
    systick_config();                                 // 滴答定时器初始化 1ms
    OLED_Init();                                      // 初始化OLED
    OLED_Clear();
    while (1) {
        OLED_ShowString(0, 0, "ABC", 8, 1);   // 6*8 “ABC”
        OLED_ShowString(0, 8, "DEF", 12, 1);  // 6*12 “ABC”
        OLED_ShowString(0, 20, "123", 16, 1); // 8*16 “ABC”
        OLED_ShowString(0, 36, "ABC", 24, 1); // 12*24 “ABC”
        OLED_Refresh();
        delay_1ms(500);
    }
}